# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=jsoncpp
pkgver=1.9.6
pkgrel=1
pkgdesc="JSON C++ library"
url="https://github.com/open-source-parsers/jsoncpp"
arch="all"
license="Public-Domain"
makedepends="meson"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/open-source-parsers/jsoncpp/archive/$pkgver.tar.gz
	remove-check_required_components-meson.patch
	"

build() {
	abuild-meson \
		--default-library=both \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
006d81f9f723dcfe875ebc2147449c07c5246bf97dd7b9eee1909decc914b051d6f3f06feb5c3dfa143d28773fb310aabb04a81dc447cc61513309df8eba8b08  jsoncpp-1.9.6.tar.gz
fcae084a5063891fd87c23f26df48d0a7bf66dbfb6998b1cd32fecd228a4e4c4aa512e4cbb8c7e4752057b859f45830f46ab77597e84a1d0ef0d883223a4d400  remove-check_required_components-meson.patch
"
